Cisco Packet Tracer Extensions API 8.1.0
API for communication between Cisco Packet Tracer application and its extension applications and modules.
Public Member Functions | List of all members
CAsaServiceObjectGroup Class Reference

CAsaServiceObjectGroup is service type object-group class. More...

Public Member Functions

bool addServiceObjectPortNum (string, string, string, int)
 Add port setting to the service object-group service-object tcp [<destination | source > <eq | gt | lt | neq> <port>]. More...
 
bool addPortObjectPortNum (string, int)
 Add port setting to the service object-group port-object eq <keyword> More...
 
bool addPortObjectPortStr (string, string)
 Add port setting to the service object-group port-object eq <keyword> More...
 
int removeServiceObjectPortNum (string, string, string, int)
 Remove port setting to the service object-group service-object tcp [<destination | source > <eq | gt | lt | neq> <port>]. More...
 
int removePortObjectPortNum (string, int)
 Remove port setting to the service object-group port-object eq <keyword> More...
 
int removePortObjectPortStr (string, string)
 Remove port setting to the service object-group port-object eq <keyword> More...
 
bool addPortRange (int, int)
 Add port setting to the service object-group port-object range <0-65535> <0-65535> More...
 
bool removePortRange (int, int)
 Remove port setting to the service object-group port-object range <0-65535> <0-65535> More...
 
void addIcmp (string, bool)
 Add service type icmp service-object icmp/icmp6 [echo | echo-reply]. More...
 
bool removeIcmp (string, bool)
 Remove service type icmp service-object icmp/icmp6 [echo | echo-reply]. More...
 
int getAclStatementCount ()
 Returns the number of acl statements generated by this object-group. More...
 
AclStatement getAclStatementAt (int)
 Returns the acl statement at a specific index. More...
 
vector< string > getRunningConfig ()
 Returns the string configuration of the object. More...
 
string supportedTcpPortNameToStr (int)
 Returns tcp protocol associate with the port number. More...
 
int supportedTcpPortNameToNum (string)
 Returns the port number based on protocol name. More...
 

Detailed Description

CAsaServiceObjectGroup is service type object-group class.

Member Function Documentation

◆ addIcmp()

void CAsaServiceObjectGroup::addIcmp ( string  ,
bool   
)

Add service type icmp service-object icmp/icmp6 [echo | echo-reply].

Parameters
icmpStr,echo/echo-reply
isIpv4,truefor ipv4 and false for ipv6

◆ addPortObjectPortNum()

bool CAsaServiceObjectGroup::addPortObjectPortNum ( string  ,
int   
)

Add port setting to the service object-group port-object eq <keyword>

Parameters
operatorString,eq
portNum,portnumber
Returns
bool, value is true if the add was successful, false if not.

◆ addPortObjectPortStr()

bool CAsaServiceObjectGroup::addPortObjectPortStr ( string  ,
string   
)

Add port setting to the service object-group port-object eq <keyword>

Parameters
operatorString,eq
strPortNum,protocolassociate with the port number
Returns
bool, value is true if the add was successful, false if not.

◆ addPortRange()

bool CAsaServiceObjectGroup::addPortRange ( int  ,
int   
)

Add port setting to the service object-group port-object range <0-65535> <0-65535>

Parameters
startPortNum,startport number
endPortNum,endport number
Returns
bool, value is true if the port range could be added, false if not.

◆ addServiceObjectPortNum()

bool CAsaServiceObjectGroup::addServiceObjectPortNum ( string  ,
string  ,
string  ,
int   
)

Add port setting to the service object-group service-object tcp [<destination | source > <eq | gt | lt | neq> <port>].

Parameters
protocolString,tcp/udp
directionStr,destination/source
operatorString,eq| gt | lt | neq
portNum,portnumber
Returns
bool, value is true if the service

◆ getAclStatementAt()

AclStatement CAsaServiceObjectGroup::getAclStatementAt ( int  )

Returns the acl statement at a specific index.

Parameters
index,indexto get the statment from. Range (0, getAclStatementCount()).
Returns
AclStatement, Acl state at the specified index, if it exists.

◆ getAclStatementCount()

int CAsaServiceObjectGroup::getAclStatementCount ( )

Returns the number of acl statements generated by this object-group.

return int, value is the number of acl statements generated by this object-group.

◆ getRunningConfig()

vector< string > CAsaServiceObjectGroup::getRunningConfig ( )

Returns the string configuration of the object.

Returns
vector<string>, value is the string configurations of the object.

◆ removeIcmp()

bool CAsaServiceObjectGroup::removeIcmp ( string  ,
bool   
)

Remove service type icmp service-object icmp/icmp6 [echo | echo-reply].

Parameters
icmpStr,echo/echo-reply
isIpv4,truefor ipv4 and false for ipv6

return bool, value is true if the removal was successful, false if not.

◆ removePortObjectPortNum()

int CAsaServiceObjectGroup::removePortObjectPortNum ( string  ,
int   
)

Remove port setting to the service object-group port-object eq <keyword>

Parameters
operatorString,eq
portNum,portnumber
Returns
int, value 0 – successful, 1 – ACL doesn't exist, 2 – unable to remove.

◆ removePortObjectPortStr()

int CAsaServiceObjectGroup::removePortObjectPortStr ( string  ,
string   
)

Remove port setting to the service object-group port-object eq <keyword>

Parameters
operatorString,eq
strPortNum- protocol associate with the port number
Returns
int, value 0 – successful, 1 – ACL doesn't exist, 2 – unable to remove.

◆ removePortRange()

bool CAsaServiceObjectGroup::removePortRange ( int  ,
int   
)

Remove port setting to the service object-group port-object range <0-65535> <0-65535>

Parameters
startPortNum,startport number
endPortNum,endport number
Returns
bool, value is true if the port range could be removed, false if not.

◆ removeServiceObjectPortNum()

int CAsaServiceObjectGroup::removeServiceObjectPortNum ( string  ,
string  ,
string  ,
int   
)

Remove port setting to the service object-group service-object tcp [<destination | source > <eq | gt | lt | neq> <port>].

Parameters
protocolString- tcp/udp
directionStr- destination/source
operatorString- eq | gt | lt | neq
portNum- port number
Returns
int, value 0 – successful, 1 – ACL doesn't exist, 2 – unable to remove.

◆ supportedTcpPortNameToNum()

int CAsaServiceObjectGroup::supportedTcpPortNameToNum ( string  )

Returns the port number based on protocol name.

Parameters
strPortNum,protocolthat associates with port number.
Returns
int, value is port number based on protocol name.

◆ supportedTcpPortNameToStr()

string CAsaServiceObjectGroup::supportedTcpPortNameToStr ( int  )

Returns tcp protocol associate with the port number.

Parameters
portNum,portnumber to find the associated tcp protocal for.
Returns
string, value is the tcp protocol assoiated with the port number

The documentation for this class was generated from the following file: